//
//  UIView+Loading.h
//  Sekiss
//
//  Created by Alex on 15-3-3.
//  Copyright (c) 2015年 Alex. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <objc/runtime.h>

typedef enum
{
    UIViewLoadingTypeDefault=1,//清空页面，只显示加载
    UIViewLoadingTypeBlack,//黑色遮罩覆盖
    UIViewLoadingTypeClear//透明遮罩覆盖
}UIViewLoadingType;

typedef enum
{
    UIViewRetryTypeDefault=1,//清空页面
    UIViewRetryTypeBlack,//黑色遮罩覆盖
    UIViewRetryTypeClear//透明遮罩覆盖
}UIViewRetryType;

@interface UIView (Loading)

//显示加载动画
-(void)startLoading;
-(void)startLoadingWithMask:(UIViewLoadingType)type;
//显示加载动画＋文字
-(void)startLoadingWithText:(NSString*)text;
-(void)startLoadingWithText:(NSString*)text Mask:(UIViewLoadingType)type;
//去除加载动画
-(void)stopLoading;

//显示重试按钮
-(void)showRetryWithText:(NSString*)text OnClick:(void (^)())click;
-(void)showRetryWithText:(NSString*)text Mask:(UIViewRetryType)type OnClick:(void (^)())click;;

@end
